import React, { Component } from 'react'
import PropTypes from 'prop-types'
class Message extends Component {
  // constructor(props) {
  //   super(props)
  // }
  static defaultProps = {
    count: 4
  }
  render() {
    const { count } = this.props
    return (
      <div>
        <p>Message count：{ count }</p>
      </div>
    )
  }
}

// Prop类型验证
Message.propTypes = {
  count: PropTypes.number
}
// Props类型默认值
// Message.defaultProps = {
//   count: 3
// }

export default Message